﻿using System;
using MongoDB.Bson;

namespace QuotationService.HistoryQuotation
{
    /// <summary>
    /// 基本信息历史数据类
    /// </summary>
    internal class FutureBasicInfo
    {
        public ObjectId _id;

        #region 属性（数据）

        /// <summary>
        /// 商品ID
        /// </summary>
        public string Code { get; set; }

        /// <summary>
        /// 商品名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 涨停价
        /// </summary>
        public double MaxOrderPrice { get; set; }

        /// <summary>
        /// 跌停价
        /// </summary>
        public double MinOrderPrice { get; set; }

        /// <summary>
        /// 开盘价
        /// </summary>
        public double OpenPrice { get; set; }

        /// <summary>
        /// 收盘价
        /// </summary>
        public double PreClosePrice { get; set; }

        /// <summary>
        /// 小数位数
        /// </summary>
        public int Decimal { get; set; }


        /// <summary>
        ///记录更新的时间
        /// </summary>
        public DateTime UpdateTime { get; set; }

        /// <summary>
        /// 行情记录中包含的行情时间
        /// </summary>
        public DateTime QuotationTime { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public string MappingContractId { set; get; }

        /// <summary>
        /// 商品ID
        /// </summary>
        public string ProductId { get; set; }

        /// <summary>
        /// 上市日期
        /// </summary>
        public Int32 BeginDate { get; set; }

        /// <summary>
        /// 到期日
        /// </summary>
        public Int32 EndDate { get; set; }

        /// <summary>
        /// 交割日
        /// </summary>
        public Int32 AccountDate { get; set; }

        /// <summary>
        /// 价格档位
        /// </summary>
        public double OrderPriceUnit { get; set; }

        /// <summary>
        /// 持仓量
        /// </summary>
        public Int64 OpenPosition { get; set; }

        /// <summary>
        /// 昨日持仓量
        /// </summary>
        public Int64 PreOpenPosition { get; set; }

        /// <summary>
        /// 昨日成交量
        /// </summary>
        public Int64 PreExchTotalKnockQty { get; set; }

        /// <summary>
        /// 昨日成交金额
        /// </summary>
        public double PreExchTotalKnockAmt { get; set; }


        /// <summary>
        /// 昨日结算价
        /// </summary>
        public double PreSettlementPrice { get; set; }

        /// <summary>
        /// 今日结算价
        /// </summary>
        public double SettlementPrice { get; set; }

        /// <summary>
        /// 限价委托上限
        /// </summary>
        public Int32 MaxLimitOrderQty { get; set; }

        /// <summary>
        /// 限价委托下限
        /// </summary>
        public Int32 MinLimitOrderQty { get; set; }

        /// <summary>
        /// 市价委托上限
        /// </summary>
        public Int32 MaxMarketOrderQty { get; set; }

        /// <summary>
        /// 市价委托下限
        /// </summary>
        public Int32 MinMarketOrderQty { get; set; }

        /// <summary>
        /// 合约序号
        /// </summary>
        public Int32 ContractSerialNo { get; set; }

        /// <summary>
        /// 每手数量
        /// </summary>
        public int ConvertQty { get; set; }

        /// <summary>
        /// 是否是大边保证金
        /// </summary>
        public bool BigMarginFlag { get; set; }


        /// <summary>
        /// 证券类型
        /// </summary>
        public string StkType { get; set; }

        /// <summary>
        ///  交易类型
        /// </summary>
        public string TradeType { get; set; }

        /// <summary>
        /// 行情来源
        /// </summary>
        public string QuotLevel { get; set; }


        /// <summary>
        /// 静态资料版本，格式为：YYYYMMDDhhmmss，即：年月日时分秒
        /// </summary>
        public Int64 StaticVer { get; set; }

        /// <summary>
        /// 动态资料版本，格式为：YYYYMMDDhhmmss，即：年月日时分秒
        /// </summary>
        public Int64 DynamicVer { get; set; }
        #endregion

    }
}
